var express = require('express');


var router = express.Router();

router.post('/mine/address/query',function (req,res) {
	res.send({
		"status": 0,
		  "data": [
		    {
		      "user_id": 8,
		      "consignee": "杜玉1111",
		      "id": 1,
		      "phone": "18382412022",
		      "address": "四川省成都市武侯区高升桥七道堰",
		      "del_mark": 0
		    },
		    {
		      "user_id": 8,
		      "consignee": "杜玉龙2",
		      "id": 2,
		      "phone": "18382412022",
		      "address": "四川省成都市武侯区高升桥七道堰",
		      "del_mark": 0
		    },
		    {
		      "user_id": 8,
		      "consignee": "杜玉龙3",
		      "id": 3,
		      "phone": "18382412022",
		      "address": "四川省成都市武侯区高升桥七道堰",
		      "del_mark": 0
		    }
		  ]

	})
})

router.post('/mine/address/aoe',function (req,res) {
	res.send(
		{
		  "status": 0,
		  "msg": "操作成功"
		}
	)
})


router.post('/product/filter',function (req,res) {
	res.send({
		"category": [
	      {
	        "id": 1,
	        "name": "太阳镜"
	      }
	    ],
	    "models": [
	      {
	        "id": 1,
	        "name": "男"
	      },
	      {
	        "id": 2,
	        "name": "女"
	      },
	      {
	        "id": 3,
	        "name": "男/女"
	      }
	    ],
	    "frame": [
	      {
	        "id": 1,
	        "name": "全框"
	      },
	      {
	        "id": 2,
	        "name": "半框"
	      }
	    ],
	    "compos": [
	      {
	        "id": 1,
	        "name": "材质1"
	      },
	      {
	        "id": 2,
	        "name": "材质2"
	      },
	      {
	        "id": 3,
	        "name": "材质3"
	      },
	      {
	        "id": 4,
	        "name": "材质4"
	      }
	    ]
	}
		
	)	
})

router.post('/product/filter2',function (req,res) {
	console.log(req.body)

	res.send([
    {
      "color": "green",
      "price": 0,
      "image_url": "assets/goods1.png",
      "id": 1,
      "name": "暴龙特别版"
    },
    {
      "color": "blue",
      "price": 0,
      "image_url": "assets/goods1.png",
      "id": 2,
      "name": "光明眼镜"
    }
  ]
)
})


router.post('/mine/prescription/query',function (req,res) {
	res.send( [
    {
      "r_pd": 80,
      "l_pd": 70,
      "l_cyl": 30,
      "name": "我的第一张验光单",
      "l_axis": 50,
      "l_sph": 10,
      "r_axis": 60,
      "r_sph": 20,
      "id": 1,
      "user_id": 8,
      "r_cyl": 40,
      "del_mark": 0
    },
    {
      "r_pd": 30,
      "l_pd": 30,
      "l_cyl": 40,
      "name": "我的第二张验光单",
      "l_axis": 60,
      "l_sph": 20,
      "r_axis": 60,
      "r_sph": 20,
      "id": 2,
      "user_id": 8,
      "r_cyl": 40,
      "del_mark": 0
    }
  ]
)
})


router.post('/product/detail',function (req,res) {
	console.log(req.body)

	res.send( {
    "name": "暴龙特别版",
    "degree": 0,
    "color": "",
    "price": 0,
    "number": 20,
    "models": 0,
    "image_url": "https://my-wasowa-com.oss-cn-beijing.aliyuncs.com/banner_1472551436.png",
    "banner": [
      {
        "id": 1,
        "image_url": "https://my-wasowa-com.oss-cn-beijing.aliyuncs.com/banner_1472551436.png",
        "product_id": 1,
        "name": "banner",
        "sequence": 0
      }
    ],
    "id": 1
  }
)
})
module.exports = router;